<?php

namespace app\common\model;

use think\Request;
use think\Exception;
/**
 * 用户模型类
 * Class User
 * @package app\common\model
 */
class MemberRank extends BaseModel
{
    protected $name = 'member_rank';
    protected $autoWriteTimestamp = false;

    const KEGUAN = 5; //客官
    const WANJIA = 6; //玩家
    const ZHANGGUI = 7; //掌柜

    public static function getRank($id,$is_throw = true)
    {
        $result = self::get($id);
        if (!$result && $is_throw) {
            throw new Exception('用户等级不存在');
        } 
        return $result;
    }
    
}
